<?php
$this->headMeta()->appendHttpEquiv('Content-Type','text/html;charset=utf-8');
$this->headTitle()->setSeparator(' - ');
$this->headTitle('CMDB');
echo $this->doctype();
$auth = Zend_Auth::getInstance()->getIdentity();

//$proto = "http" .
//    ((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == "on") ? "s" : "") . "://";
//$server = isset($_SERVER['HTTP_HOST']) ?
//    $_SERVER['HTTP_HOST'] : $_SERVER['SERVER_NAME'];
//$base_url    = $proto . $server.'/';
if($_SERVER['SERVER_PORT'] == '443'){
    $base_url    = 'https://' . $_SERVER['SERVER_NAME'].'/';
}else{
    $base_url    = 'http://' . $_SERVER['SERVER_NAME'].'/';
}
?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <base href="<?php echo $base_url;?>" />
    <?php echo $this->headMeta(); ?>
    <?php echo $this->headTitle(); ?>
    
    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
    <link type="text/css" rel="stylesheet" media="all" href="css/cmdb.css" />
	<link href="jquery-ui-1.10.2.custom/css/smoothness/jquery-ui-1.10.2.custom.min.css" rel="stylesheet"/>
    
    <script type="text/javascript" src="js/jquery-1.9.1.min.js"></script>
	<script src="jquery-ui-1.10.2.custom/js/jquery-ui-1.10.2.custom.min.js"></script>
    <script type="text/javascript" src="js/jquery.price_format.1.7.min.js"></script>
    <script type="text/javascript" src="js/string.js"></script>
    <link type="text/css" rel="stylesheet" media="screen" href="fancybox/jquery.fancybox.css" />
    <script type="text/javascript" src="fancybox/jquery.mousewheel-3.0.6.pack.js"></script>
    <script type="text/javascript" src="fancybox/jquery.fancybox.pack.js"></script>
    <script>
        $(document).ready(function() {
            $( document ).tooltip({
                position: {
                    my: "center bottom-20",
                    at: "center top",
                    using: function( position, feedback ) {
                        $( this ).css( position );
                        $( "<div>" )
                        .addClass( "arrow" )
                        .addClass( feedback.vertical )
                        .addClass( feedback.horizontal )
                        .appendTo( this );
                    }
                }
            });
        });
    </script>
        
</head>
<body>
<div id="header">
    <div class="header-top tr">
    	<p>
            Welcome manage! <strong>"<?php echo $auth['username'];?>"</strong> |
        	<a href="<?php echo $this->url(array ('module' => 'it','controller' => 'equipment','action'=>'search'));?>">Homepage</a> |
        	<a href="<?php echo $this->url(array ('module' => 'it','controller' => 'changepass','action'=>'index'));?>">Change pass</a> |
        	<a href="<?php echo $this->url(array ('module' => 'it','controller' => 'auth' ,'action' => 'logout'));?>">Logout</a>
    	</p>
    </div>
</div>
<div class="header-middle">
	<div id='cssmenu'>
		<ul>
		  <?php  echo $this->partial('menuit.phtml', array('auth' => $auth)); ?>
		</ul>
	</div>
    <br class="cl" />
</div>
<div class="header-bottom"></div>
<div id="page-wrapper">
    <div class="page">
        <div id="page-content">
            <div id="page-header">
                <h1>CMDB IT &raquo; <?php $title = $this->headTitle(); echo $title[0]; ?></h1>
            </div>
            <div class="container_12">
                <?php echo $this->layout()->content; ?>
                <br class="cl" />
            </div>
        </div>
    </div>
</div>
<div class="footer">Copyright &copy; 2012 | the SSG Technical Team</div>
</body>

</html>